package STUDENT.TRINHQUANGXUANDUC.OPPS.TAMGIAC;

public class Models {
	public boolean CheckTamgiac(TamgiacObject object) {
		if (object.getSide1() + object.getSide2() > object.getSide3()
				&& object.getSide2() + object.getSide3() > object.getSide1()
				&& object.getSide1() + object.getSide3() > object.getSide2()) {
			return true;
		}
		return false;
	}

	public double Area(TamgiacObject object) {
		double p = (object.getSide1() + object.getSide2() + object.getSide3()) / 2;
		return Math.sqrt(p * (p - object.getSide1()) * (p - object.getSide2()) * (p - object.getSide3()));
	}

	public double Perimeter(TamgiacObject object) {
		return object.getSide1() + object.getSide2() + object.getSide3();
	}

}
